<?php
declare (strict_types = 1);

namespace app\controller;

use app\traits\CommonTrait;
use think\facade\Db;
use think\facade\Request;

class AdminTeam
{
    use CommonTrait;
    //筛选列表
    public function teamList()
    {
        $companyId = Request::get('company_id');
        if(!$companyId){
            return $this->apiJson(-1,'请选择公司');
        }
        $list = Db::name('sales_man_team')->where(['company_id'=>$companyId])->field('id,name,head_img,status,create_time')
            ->select();
        return $this->apiJson(1,'success',$list);
    }
}
